package com.java.test.system.registrationtemplate.entity;

import lombok.Data;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

/**
 * 字段实体
 *
 * @author lijie1
 * @date 2020/6/29 0029
 */
@Data
public class FieldEntity implements RowMapper<FieldEntity> {
    private Long id;//id
    private String name;//名称
    private String operation;//操作人
    private Date modifyTime;//修改时间
    private Date createTime;//操作时间
    private boolean status;//状态

    @Override
    public FieldEntity mapRow(ResultSet resultSet, int i) throws SQLException {
        FieldEntity info = new FieldEntity();
        info.setName(resultSet.getString("name"));
        info.setId(resultSet.getLong("id"));
        info.setOperation(resultSet.getString("operation"));
        info.setModifyTime(resultSet.getDate("modifyTime"));
        info.setCreateTime(resultSet.getDate("createTime"));
        info.setStatus(resultSet.getBoolean("status"));
        return info;
    }
}
